# coding:utf-8
# 作者：理想国真恵玩
import numpy as np

arr1 = np.array([1, 1, 1, 2, 2, 2, 3, 3, 4])
arr2 = np.array(arr1)  # 深拷贝
print(arr1)
# 一维数组去重
arr1 = np.unique(arr1)
print(arr1)

# 二维数组去重
print('二维数组去重')
arr2.resize([3, 3])
print(arr2)
arr2 = np.unique(arr2)
print(arr2)
